package com.shengyijie.model.object.baseobject;

import android.database.Cursor;
 

public class User {

	private String UserID="";
	private int UserType;
	private String Session_ID; 
	private int state;     
	
	private int isRemember=0;     
	
	private String email="";
	private String user_name="";
	private String password="";
	private String password_show=""; 
	private String mobile="";
	private String com_type="";
	private String reg_status="";
	private String validemail="";
	private String active_key="";
	private String reg_time="";
	private String last_login_time=""; 
	
	public User(){
	}

	public String getUserID() {
		return UserID;
	}

	public void setUserID(String userID) {
		UserID = userID;
	}

	public int getUserType() {
		return UserType;
	}

	public void setUserType(int userType) {
		UserType = userType;
	}

	public String getSession_ID() {
		return Session_ID;
	}

	public void setSession_ID(String session_ID) {
		Session_ID = session_ID;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPassword_show() {
		return password_show;
	}

	public void setPassword_show(String password_show) {
		this.password_show = password_show;
	}
 

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getCom_type() {
		return com_type;
	}

	public void setCom_type(String com_type) {
		this.com_type = com_type;
	}

	public String getReg_status() {
		return reg_status;
	}

	public void setReg_status(String reg_status) {
		this.reg_status = reg_status;
	}

	public String getValidemail() {
		return validemail;
	}

	public void setValidemail(String validemail) {
		this.validemail = validemail;
	}

	public String getActive_key() {
		return active_key;
	}

	public void setActive_key(String active_key) {
		this.active_key = active_key;
	}

	public String getReg_time() {
		return reg_time;
	}

	public void setReg_time(String reg_time) {
		this.reg_time = reg_time;
	}

	public String getLast_login_time() {
		return last_login_time;
	}

	public void setLast_login_time(String last_login_time) {
		this.last_login_time = last_login_time;
	}

	public String getUser_name() {
		return user_name;
	}

	public void setUser_name(String user_name) {
		this.user_name = user_name;
	}

	public int getIsRemember() {
		return isRemember;
	}

	public void setIsRemember(int isRemember) {
		this.isRemember = isRemember;
	}
 
	 
	public User getUserFromCursor(Cursor cursor){
		try{
			if(cursor==null)
				return null;
			if(cursor.getCount()>0){
			    cursor.moveToFirst();
			    this.setUserID(cursor.getString(0));
				this.setUserType(cursor.getInt(1));
				this.setSession_ID(cursor.getString(2));
				this.setIsRemember(cursor.getInt(3)); 
			    return this;
			}
			cursor.close();
			return null;
		}catch(Exception e){return null;}
	}
	 
	 

	
 
}
